/**
 * 模型
 * 砖墙
 */
import AbstractModel from "./abstract/AbstractModel";
import {image} from "../service/image";
import config from "../config";
import wallBrick from "../canvas/WallBrick";

export default class ModelWall extends AbstractModel implements IModel {
    name: string = 'wallBrick';

    // 画布实例
    canvas: ICanvas = wallBrick;
    // 继承父类抽象方法:渲染贴图
    // 一些初始化自定义的动作、行为，都在这里进行
    render(): void {
        super.draw()
    }

    // 获取贴图
    getImage(): HTMLImageElement {
        return image.get(this.name as keyof typeof config.images)!;
    }
}
